package com.qiusuo0226.platform.pojo.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.qiusuo0226.mysql.pojo.CommonEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 接口访问记录 数据源对象
 * - @Data lombok getter、setter、toString、hash注解
 * - @AllArgsConstructor lombok 全参构造 注解
 * - @NoArgsConstructor lombok 无参构造 注解
 * - @TableName mybaitsPlus 表名 注解
 * - @Table actable 表名 注解
 * - @TableCharset actable 表编码 注解
 * - @TableEngine actable 引擎 注解
 * @author qiusuo
 * @date 2023/3/22 15:33
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "sys_request_record")
//@Table(name = "sys_request_record", comment = "接口访问记录表")
//@TableCharset(MySqlCharsetConstant.UTF8MB4)
//@TableEngine(MySqlEngineConstant.InnoDB)
public class RequestRecordPO extends CommonEntity implements Serializable {

    private static final long serialVersionUID = -999955099415366720L;

    @TableField(value = "remote_host")
//    @Column(name = "remote_host", type = MySqlTypeConstant.VARCHAR, length = 50, comment = "目标主机的IP")
    private String remoteHost;

    @TableField(value = "request_method")
//    @Column(name = "request_method", type = MySqlTypeConstant.VARCHAR, length = 20, comment = "目标请求类型")
    private String requestMethod;

    @TableField(value = "request_url")
//    @Column(name = "request_url", type = MySqlTypeConstant.VARCHAR, comment = "目标请求URL")
    private String requestUrl;

    @TableField(value = "method_path")
//    @Column(name = "method_path", type = MySqlTypeConstant.VARCHAR, comment = "方法路径（代码中路径）")
    private String methodPath;

    @TableField(value = "time_consume")
//    @Column(name = "time_consume", type = MySqlTypeConstant.BIGINT, comment = "接口耗费时间：单位ms")
    private Long timeConsume;

}
